package com.douing.ad.dsp.bidding.rtb;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.math.BigInteger;
import java.util.HashMap;
import java.util.Map;
import java.util.TreeMap;



public class TxtUtil{
    
    public static Map<Long, Long[]> map = new TreeMap<Long, Long[]>();
    public static void poiTXT2007() throws IOException{
        
        try {
            InputStream is = TxtUtil.class.getResourceAsStream("/ip_code.txt");
            BufferedReader br = new BufferedReader(new InputStreamReader(is,"UTF-8"));
            String lineTxt = null;
            while ((lineTxt = br.readLine()) != null) {
                String[] stringArr = lineTxt.split(",");
                Long[] intArr = new Long[stringArr.length];
                for (int i = 0; i < stringArr.length; i++) {
                    for(int j=1;j<intArr.length;j++){
                        intArr[j] = Long.parseLong(stringArr[j]);
                    }
                }
                map.put(new Long(stringArr[0]), intArr);
            }
            br.close();
        } catch (Exception e) {
            System.err.println("读取 ip文件txt出错" + e);
        } 
    }
}